<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:awc="clr-namespace:Assergs.Windows.Controls"
    xmlns:aw="clr-namespace:Assergs.Windows"
	>

    <SolidColorBrush x:Key="ForegroundBrush" Color="{x:Static aw:HeaderedPanelPallet.Foreground}"/>
    <SolidColorBrush x:Key="NormalBorderBrush" Color="{x:Static aw:HeaderedPanelPallet.NormalBorder}"/>
    <SolidColorBrush x:Key="BodyBackgroundBrush" Color="{x:Static aw:HeaderedPanelPallet.BodyBackground}" />
    
    <LinearGradientBrush x:Key="HeaderBorderBrush" StartPoint="0,0.5" EndPoint="1,0.5">
        <GradientStop Color="{x:Static aw:HeaderedPanelPallet.HeaderBackground1}" Offset="0"/>
        <GradientStop Color="{x:Static aw:HeaderedPanelPallet.HeaderBackground2}" Offset="1"/>
    </LinearGradientBrush>
    
    <LinearGradientBrush x:Key="HeaderBackgroundBrush" StartPoint="0,0.5" EndPoint="1,0.5">
        <GradientStop Color="{x:Static aw:HeaderedPanelPallet.HeaderBackground2}" Offset="0"/>
        <GradientStop Color="{x:Static aw:HeaderedPanelPallet.HeaderBackground1}" Offset="1"/>
    </LinearGradientBrush>
    
    <Style x:Key="{x:Type awc:HeaderedPanel}" TargetType="{x:Type awc:HeaderedPanel}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type awc:HeaderedPanel}">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <Border
                            Grid.Row="0"
                            Background="{StaticResource HeaderBackgroundBrush}"
                            BorderBrush="{StaticResource HeaderBorderBrush}"
                            BorderThickness="0,1,1,0"
                            CornerRadius="2,2,0,0" >
                            <ContentPresenter
                                Margin="4"
                                ContentSource="Header"
                                RecognizesAccessKey="True"/>
                        </Border>
                        <Border
                            Grid.Row="1"
                            Background="{StaticResource BodyBackgroundBrush}"
                            BorderBrush="{StaticResource NormalBorderBrush}"
                            BorderThickness="1,0,1,1"
                            CornerRadius="0,0,2,2" >
                            <ContentPresenter Margin="4"/>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>